home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / DockStrip / MoreInterfaceLib / MoreInterfaceLib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  5.5 KB  |  169 lines

  1. /*
  2.     File:        MoreInterfaceLib.h
  3.  
  4.     Contains:    Interface to compatibility shim for routines not in InterfaceLib.
  5.  
  6.     Written by:    Quinn
  7.  
  8.     Copyright:    Copyright © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <8>     16/9/99    Quinn   Add FSM FCB accessors.
  21.          <7>     15/6/99    Quinn   Added MoreBlockZero.
  22.          <6>     15/6/99    Quinn   Added Extended Disk Init Package routines.
  23.          <5>     22/4/99    Quinn   Added PBRemoteAccess.
  24.          <4>     20/4/99    Quinn   Added Gestalt Value routines.
  25.          <3>     16/3/99    Quinn   Added MoreUTFindDrive and MoreAddDrive.
  26.          <2>      1/3/99    Quinn   Added MoreFlushCodeCacheRange.  Also corrected a serious bug in
  27.                                     MoreDriverInstallReserveMem, which was missing the #pragma
  28.                                     parameter stuff.  Also some general tidy up.
  29.          <1>     25/2/99    Quinn   First checked in.
  30. */
  31.  
  32. #pragma once
  33.  
  34. /////////////////////////////////////////////////////////////////
  35.  
  36. // MoreIsBetter Setup
  37.  
  38. #include "MoreSetup.h"
  39.  
  40. // Mac OS Interfaces
  41.  
  42. #include <MacTypes.h>
  43. #include <Devices.h>
  44. #include <MacMemory.h>
  45. #include <FSM.h>
  46.  
  47. // MIB Interfaces
  48.  
  49. #include "RemoteAccessInterface.h"
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. /////////////////////////////////////////////////////////////////
  56.  
  57. extern pascal SInt16 MoreLMGetUnitTableEntryCount(void)
  58.     TWOWORDINLINE(0x3EB8, 0x01D2);
  59.  
  60. extern pascal void   MoreLMSetUnitTableEntryCount(SInt16 value)
  61.     TWOWORDINLINE(0x31DF, 0x01D2);
  62.  
  63. /////////////////////////////////////////////////////////////////
  64.  
  65.     #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  66.     #pragma parameter __D0 MoreDriverInstallReserveMem(__A0, __D0)
  67.     #endif
  68.  
  69. extern pascal OSErr  MoreDriverInstallReserveMem(DRVRHeaderPtr drvrPtr, DriverRefNum refNum)
  70.     ONEWORDINLINE(0xA43D);
  71.  
  72. /////////////////////////////////////////////////////////////////
  73.  
  74.     #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  75.     #pragma parameter __D0 MoreFlushCodeCacheRange(__A0, __A1)
  76.     #endif
  77.  
  78. extern pascal OSErr  MoreFlushCodeCacheRange(void *address, unsigned long count)
  79.     TWOWORDINLINE(0x7009, 0xA098);
  80.  
  81. /////////////////////////////////////////////////////////////////
  82.  
  83. extern pascal OSErr MoreUTFindDrive(SInt16 driveNum, DrvQElPtr *driveQElementPtr)
  84.     TWOWORDINLINE(0x700F, 0xA824);
  85.  
  86. extern pascal OSErr MoreUTLocateFCB(VCBPtr                 volCtrlBlockPtr,
  87.                                  unsigned long             fileNum,
  88.                                  StringPtr                 namePtr,
  89.                                  short *                fileRefNum,
  90.                                  FCBRecPtr *            fileCtrlBlockPtr)
  91.     TWOWORDINLINE(0x7002, 0xA824);
  92.  
  93. extern pascal OSErr MoreUTLocateNextFCB(VCBPtr             volCtrlBlockPtr,
  94.                                  unsigned long             fileNum,
  95.                                  StringPtr                 namePtr,
  96.                                  short *                fileRefNum,
  97.                                  FCBRecPtr *            fileCtrlBlockPtr)
  98.     TWOWORDINLINE(0x7003, 0xA824);
  99.  
  100. extern pascal OSErr MoreUTIndexFCB(VCBPtr                 volCtrlBlockPtr,
  101.                                  short *                fileRefNum,
  102.                                  FCBRecPtr *            fileCtrlBlockPtr)
  103.     TWOWORDINLINE(0x7004, 0xA824);
  104.  
  105. extern pascal OSErr MoreUTResolveFCB(short                 fileRefNum,
  106.                                  FCBRecPtr *            fileCtrlBlockPtr)
  107.     TWOWORDINLINE(0x7005, 0xA824);
  108.  
  109. /////////////////////////////////////////////////////////////////
  110.  
  111. extern pascal void MoreAddDrive(DriverRefNum drvrRefNum, SInt16 drvNum, DrvQElPtr qEl);
  112.  
  113. /////////////////////////////////////////////////////////////////
  114.  
  115. extern pascal OSErr MoreNewGestaltValue(OSType selector, long newValue)
  116.     THREEWORDINLINE(0x303C, 0x0401, 0xABF1);
  117.  
  118. extern pascal OSErr MoreReplaceGestaltValue(OSType selector, long replacementValue)
  119.     THREEWORDINLINE(0x303C, 0x0402, 0xABF1);
  120.  
  121. extern pascal OSErr MoreSetGestaltValue(OSType selector, long newValue)        
  122.     THREEWORDINLINE(0x303C, 0x0404, 0xABF1);
  123.  
  124. extern pascal OSErr MoreDeleteGestaltValue(OSType selector)
  125.     THREEWORDINLINE(0x303C, 0x0203, 0xABF1);
  126.  
  127. /////////////////////////////////////////////////////////////////
  128.  
  129. extern pascal OSErr MorePBRemoteAccess(TPRemoteAccessParamBlock paramBlock, Boolean async)
  130.     TWOWORDINLINE(0x7000,0xAA5B);
  131.  
  132. /////////////////////////////////////////////////////////////////
  133.  
  134. extern pascal OSErr MoreDIXFormat(     short                     drvNum,
  135.                                      Boolean                 fmtFlag,
  136.                                      unsigned long             fmtArg,
  137.                                      unsigned long *        actSize)
  138.     THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  139.  
  140. extern pascal OSErr MoreDIXZero(     short                     drvNum,
  141.                                      ConstStr255Param         volName,
  142.                                      short                     fsid,
  143.                                      short                     mediaStatus,
  144.                                      short                     volTypeSelector,
  145.                                      unsigned long             volSize,
  146.                                      void *                    extendedInfoPtr)
  147.     THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  148.  
  149. extern pascal OSErr MoreDIReformat(     short                     drvNum,
  150.                                      short                     fsid,
  151.                                      ConstStr255Param         volName,
  152.                                      ConstStr255Param         msgText)
  153.     THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  154.  
  155. /////////////////////////////////////////////////////////////////
  156.  
  157. extern pascal void MoreBlockZero(void * destPtr, Size byteCount);
  158.  
  159. // "MacMemory.h" defines BlockZero as EXTERN_API_C, not EXTERN_API.
  160. // We reverse that here so that we have a consistent interface for
  161. // 68K clients.
  162.  
  163. /////////////////////////////////////////////////////////////////
  164.  
  165.  
  166. #ifdef __cplusplus
  167. }
  168. #endif
  169.